import request from './request'

export const scheduleApi = {
  // 获取课程表
  getClassSchedule(studentId) {
    return request.get('/schedule/class-schedule', { params: { studentId } })
  },

  // 获取明日课程
  getTomorrowClasses(studentId) {
    return request.get('/schedule/tomorrow-classes', { params: { studentId } })
  },

  // 更新课程表单项
  updateSchedule(scheduleId, data) {
    return request.put(`/schedule/class-schedule/${scheduleId}`, data)
  },

  // 批量更新课程表
  batchUpdateSchedule(data) {
    return request.post('/schedule/class-schedule/batch', data)
  },

  // 删除课程
  deleteSchedule(scheduleId) {
    return request.delete(`/schedule/class-schedule/${scheduleId}`)
  }
}